package com.cnap.multiclouldmgmt.model.images;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.NotBlank;

/**
 * 合并分片请求
 *
 * @author xc
 **/
@ApiModel
public class MergeReq {
    // 父id，应用id
    @NotBlank
    @ApiModelProperty(value = "父文件id")
    private String parentId;
    // md5
    @ApiModelProperty(value = "哈希值")
    private String md5;
    // 总大小
    @ApiModelProperty(value = "总大小")
    @DecimalMax(value = "9223372036854775807", message = "文件大小应小于9223372036854775807")
    private long totalSize;

    @JsonProperty(value = "appInfo")
    @ApiModelProperty(value = "应用信息")
    private ImageInfoModel imageInfoModel;

    /**
     * get
     *
     * @return ImageInfoModel
     */
    public ImageInfoModel getImageInfoModel() {
        return imageInfoModel;
    }

    /**
     * set
     *
     * @param imageInfoModel imageInfoModel
     */
    public void setImageInfoModel(ImageInfoModel imageInfoModel) {
        this.imageInfoModel = imageInfoModel;
    }

    /**
     * id
     *
     * @return id
     */
    public String getParentId() {
        return parentId;
    }

    /**
     * set
     *
     * @param parentId id
     */
    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    /**
     * md5
     *
     * @reurn md5
     */
    public String getMd5() {
        return md5;
    }

    /**
     * set
     *
     * @param md5 md5
     */
    public void setMd5(String md5) {
        this.md5 = md5;
    }

    /**
     * totalSize
     *
     * @return totalSize
     */
    public long getTotalSize() {
        return totalSize;
    }

    /**
     * set
     *
     * @param totalSize totalSize
     */
    public void setTotalSize(long totalSize) {
        this.totalSize = totalSize;
    }

    @Override
    public String toString() {
        return "parentId='" + parentId + '\'' +
                ", md5='" + md5 + '\'' +
                ", totalSize=" + totalSize;
    }
}
